home *** CD-ROM | disk | FTP | other *** search
- property RadioMegaLST, TankFLoopLST, EdgeFLoopLST, FLoopChanLST, PlayRadioSndChan, FishChan, NowRadioChan, PlayPosLST, TankBlnkCstNum, TankStartCstNum, TankEndCstNum, EdgeBlnkCstNum, EdgeStartCstNum, EdgeEndCstNum, RadioSndPath
-
- on birth me
- set RadioSndPath to "@:zRadAIFF:"
- set RadioMegaLST to [:]
- set LST1 to value(field "RadioPlayList1")
- addProp(RadioMegaLST, 1, LST1)
- set LST2 to value(field "RadioPlayList2")
- addProp(RadioMegaLST, 2, LST2)
- set LST3 to value(field "RadioPlayList3")
- addProp(RadioMegaLST, 3, LST3)
- set LST4 to value(field "RadioPlayList4")
- addProp(RadioMegaLST, 4, LST4)
- set LST5 to value(field "RadioPlayList5")
- addProp(RadioMegaLST, 5, LST5)
- set PlayRadioSndChan to 1
- set NowRadioChan to 1
- set PlayPosLST to [1, 1, 1, 1, 1]
- set FishChan to 9
- puppetSprite(FishChan, 1)
- set FLoopChanLST to [11, 12, 13, 14, 15, 16, 17]
- repeat with x in FLoopChanLST
- puppetSprite(x, 1)
- end repeat
- set EdgeBlnkCstNum to the number of cast "EdgeVids.BLANK"
- set EdgeStartCstNum to EdgeBlnkCstNum + 1
- set EdgeEndCstNum to the number of cast "EdgeVids.End"
- set TankBlnkCstNum to the number of cast "tankVids.BLANK"
- set TankStartCstNum to TankBlnkCstNum + 1
- set TankEndCstNum to the number of cast "TankVids.END"
- BuildTankList(me)
- BuildEdgeList(me)
- return me
- end
-
- on PlayRad me, StationNum
- set pos to getAt(PlayPosLST, StationNum)
- set PlayLST to getProp(RadioMegaLST, StationNum)
- set SndFile to getAt(PlayLST, pos)
- sound playFile PlayRadioSndChan, RadioSndPath & SndFile
- set MaxPos to count(PlayLST)
- if pos = MaxPos then
- set pos to 1
- else
- set pos to pos + 1
- end if
- setAt(PlayPosLST, StationNum, pos)
- end
-
- on NextShow me, StationNum
- if the soundBusy of PlayRadioSndChan then
- exit
- else
- PlayRad(me, StationNum)
- end if
- end
-
- on BuildTankList me
- set TankFLoopLST to []
- repeat with x = TankStartCstNum to TankEndCstNum
- add(TankFLoopLST, x)
- end repeat
- end
-
- on BuildEdgeList me
- set EdgeFLoopLST to []
- repeat with x = EdgeStartCstNum to EdgeEndCstNum
- add(EdgeFLoopLST, x)
- end repeat
- end
-
- on ClikTankLoop me, num
- set chan to getAt(FLoopChanLST, num)
- if the optionDown then
- set cst to the castNum of sprite chan
- repeat with x in FLoopChanLST
- set the castNum of sprite x to cst
- end repeat
- exit
- end if
- if the commandDown then
- KwikEdge(me, chan)
- exit
- end if
- if the controlDown then
- set the castNum of sprite chan to TankBlnkCstNum
- exit
- end if
- if count(TankFLoopLST) < 2 then
- BuildTankList(me)
- end if
- set RandCNT to count(TankFLoopLST)
- set n to random(RandCNT)
- set the castNum of sprite chan to getAt(TankFLoopLST, n)
- deleteAt(TankFLoopLST, n)
- end
-
- on KwikTank me, chan
- if count(TankFLoopLST) < 2 then
- BuildTankList(me)
- end if
- set RandCNT to count(TankFLoopLST)
- set n to random(RandCNT)
- set the castNum of sprite chan to getAt(TankFLoopLST, n)
- end
-
- on KwikEdge me, chan
- if count(EdgeFLoopLST) < 2 then
- BuildEdgeList(me)
- end if
- set RandCNT to count(EdgeFLoopLST)
- set n to random(RandCNT)
- set the castNum of sprite chan to getAt(EdgeFLoopLST, n)
- end
-
- on ClikEdgeLoop me, num
- set the castNum of sprite FishChan to TankBlnkCstNum
- set chan to getAt(FLoopChanLST, num)
- if the optionDown then
- set cst to the castNum of sprite chan
- repeat with x in FLoopChanLST
- set the castNum of sprite x to cst
- end repeat
- exit
- end if
- if the commandDown then
- KwikTank(me, chan)
- exit
- end if
- if the controlDown then
- set the castNum of sprite chan to TankBlnkCstNum
- exit
- end if
- if count(EdgeFLoopLST) < 2 then
- BuildEdgeList(me)
- end if
- set RandCNT to count(EdgeFLoopLST)
- set n to random(RandCNT)
- set the castNum of sprite chan to getAt(EdgeFLoopLST, n)
- deleteAt(EdgeFLoopLST, n)
- end
-